package com.danco.training.zaneuskaya.view;

public class Navigator {

	private Menu currentMenu;

	public Menu getCurrentMenu() {
		return currentMenu;
	}

	public void setCurrentMenu(Menu currentMenu) {
		this.currentMenu = currentMenu;
	}

	public void printMenu() {
		
		IOUtil.write(currentMenu);

	}

	public void navigate(Integer index) {
	
		setCurrentMenu(getCurrentMenu().getMenuItemByKey(index).getMenu());
	
		
	}

}
